//
//  tableTiew1AndTableTiew2.m
//  beautifulHome
//
//  Created by lanou on 15/12/18.
//  Copyright © 2015年 lanou. All rights reserved.
//

#import "tableTiew1AndTableTiew2.h"
#define kWidth [UIScreen mainScreen].bounds.size.width
#define kHeight [UIScreen mainScreen].bounds.size.height

@implementation tableTiew1AndTableTiew2

- (instancetype)initWithFrame:(CGRect)frame {
    
    if ( self = [super initWithFrame:frame]) {
        
     
        
        //整页翻动
        self.pagingEnabled = YES;
        self.contentSize = CGSizeMake(kWidth * 2, 0);
        self.bounces = NO;
        _tableView1 = [[UITableView alloc] initWithFrame:(CGRectMake(0, 20, kWidth, kHeight - 20))];
       
        [self addSubview:_tableView1];
        
        _tableView2 = [[UITableView alloc] initWithFrame:(CGRectMake(kWidth, 20, kWidth, kHeight - 20))];
        [self addSubview:_tableView2];
    
    }

    return self;
    
}


- (void)setTableViewTarget:(id)target {
    // 遵守delegate 和 dataSource
    _tableView1.delegate = target;
    _tableView1.dataSource = target;
    
    _tableView2.delegate = target;
    _tableView2.dataSource = target;
   
}



@end
